package net.sureon.biz;

import java.util.Date;
import java.util.List;

import net.sureon.dao.Application;
import net.sureon.dao.ApplicationDAO;

public class ApplicationMgrImpl implements ApplicationMgr {
	private ApplicationDAO applicationDAO;

	public Application getApplicationByID(long companyID, long applicationID) {
		return applicationDAO.getApplicationByID(companyID, applicationID);
	}

	public long insertApplication(ApplicationBO application) {
		long applicationId = 0;
		applicationId = applicationDAO.insertApplication(application
				.getApplicationVO());
		return applicationId;
	}

	public ApplicationDAO getApplicationDAO() {
		return applicationDAO;
	}

	public void setApplicationDAO(ApplicationDAO applicationDAO) {
		this.applicationDAO = applicationDAO;
	}

	public List<Application> getApplicationByGroupNotReview(long companyID, List<Long> idsAsList, int skipResults, int maxResults) {
		return applicationDAO
				.getApplicationByGroupNotReview(companyID, idsAsList, skipResults, maxResults);
	}

	public List<Application> getApplicationByGroupReview(long companyID, List<Long> idsAsList, int skipResults, int maxResults) {
		return applicationDAO.getApplicationByGroupReview(companyID, idsAsList, skipResults, maxResults);
	}

	public List<Application> getApplicationByUserNotReview(long companyID,
			long userID,int skipResults,int maxResults) {
		return applicationDAO.getApplicationByUserNotReview(companyID, userID, skipResults, maxResults);
	}

	public List<Application> getApplicationByUserReview(long companyID,
			long userID, int skipResults, int maxResults) {
		return applicationDAO.getApplicationByUserReview(companyID, userID, skipResults, maxResults);
	}

	public int updateApplication(long companyID, long applicationID, java.util.Date reviewDate,
			long reviewedBy, String reviewNote, String status) {
		return applicationDAO.updateApplication(companyID, applicationID, reviewDate,
				reviewedBy, reviewNote, status);
	}

	public int deleteApplication(long companyID, long applicationID) {
		return applicationDAO.deleteApplication(companyID, applicationID);
	}

	public int editApplication(long companyID, long applicationID,
			String category, Date startDate, Date endDate, float sumTime,
			String note, java.util.Date submitDate) {
		return applicationDAO.editApplication(companyID, applicationID, category, startDate, endDate, sumTime, note, submitDate);
	}
}
